<!DOCTYPE html>
<html>
<head>
    <title>{$data.title}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="{$data.description}" />
    <meta name="keywords" content="{$data.keyword}" />

    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <!-- css -->
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link href="__HOME__css/iconfont.css" rel="stylesheet"/>
    <link href="__HOME__css/am.css" rel="stylesheet"/>
    <link href="__HOME__css/flexslider.css" rel="stylesheet"/>
    <link href="__HOME__css/style.css" rel="stylesheet"/>
    <link rel="stylesheet" href="__HOME__css/blueimp-gallery.min.css">
    {$seo.head}
</head>
<body>
{$seo.body}

<div class="wrap">
    <!--导航-->
    {include file="public/header" /}

    <!-- page_banner -->
    <div class="page_banner magtopmenu">
        <div class="pagebanner_pic">
            <ul class="page_banner_slider clear">
                {volist name="banner" id="v" key="k"}
                <li>
                    <div class="pic">
                        <a {if $v.url neq null}href="{$v.url}"{/if}>
                            <img src="{$v.img_url}" alt="{$v.alt}" title="{$v.alt}">
                        </a>
                    </div>
                    <div class="desc">
                        {$v.content}
                    </div>
                </li>
                {/volist}

            </ul>
        </div>
    </div>
    <!-- page_banner end -->


    <!-- position -->
    <div class="position_content">
        <div class="public clear">
            <div class="position fl">
                <i class="iconfont icon-zhuye"></i>
                <a href="/">主页</a> >
                <a >联系我们 </a>
            </div>
        </div>
    </div>
    <!-- position end -->



    <!-- page -->
    <div class="_contactus padi40" id="ContactUs">
        <div class="public clear">
            <div class="singlepro_top">
                <h3 class="title">联系我们</h3>
            </div>
            <div class="fl _form padtb40" style="width: 50%">
                <form id="Contactus_form">
                    <div class="newinput">
                        <label for="name">姓名 *</label>
                        <input class="_inp_text" type="text" id="name" name="name" placeholder="姓名 *" autocomplete="off">
                    </div>
                    <div class="newinput">
                        <label for="tel">手机号码 *</label>
                        <input class="_inp_text" type="text" id="tel" name="tel" placeholder="手机号码 *" autocomplete="off">
                    </div>
                    <div class="newinput">
                        <label for="com">公司名称</label>
                        <input class="_inp_text" type="text" id="com" name="com" placeholder="公司名称" autocomplete="off">
                    </div>
                    <div class="newinput">
                        <label for="email">邮箱地址</label>
                        <input class="_inp_text" type="text" id="email" name="email" placeholder="邮箱地址" autocomplete="off">
                    </div>
                    <div class="newinput">
                        <label for="content">留言内容</label>
                        <textarea class="_inp_text _inp_new"  type="text" id="content" name="content" placeholder="留言内容" autocomplete="off"></textarea>
                    </div>
                </form>
                <a class="_submit" id="subMit">提交</a>

            </div>
            <div class="fr _other_theway padtb40" style="width: 50%">

                <div class="_theway_top">
                    <ul>
                        <li class="clear">
                            <a class="_contactus_item fl"><i class="iconfont icon-dianhua2"></i></a>
                            <div class="fl">
                                <h3 class="_title">电话 | <span class="newx">{$setup.phone}</span></h3>
                            </div>
                        </li>
                        <li class="clear">
                            <a class="_contactus_item fl"><i class="iconfont icon-tijiao"></i></a>
                            <div class="fl">
                                <h3 class="_title">传真 | <span class="newx">0531-68621928</span></h3>
                            </div>
                        </li>
                        
                        <li class="clear">
                            <a class="_contactus_item fl"><i class="iconfont icon-youxiang2"></i></a>
                            <div class="fl">
                                <h3 class="_title">邮箱 | <a href="mailto:{$setup.email}" onclick="ga('send','event','contactmail','click to email','contactclickemail');" style="text-decoration: none;">{$setup.email}</a></h3>
                            </div>
                        </li>
                        
                        <li class="clear">
                            <a class="_contactus_item fl"><i class="iconfont icon-dizhi1"></i></a>
                            <div class="fl"> 
                                <h3 class="_title">地址 | {$setup.site}</h3>
                            </div>
                        </li>
                    </ul>
                </div>

                <style>
                    ._other_theway ._theway_top ul li p{ font-size: 16px;}
                </style>



                <!--<h3 class="_title _thewayh3">您可以在社交平台关注我们</h3>-->
                <!--<div class="_theway_top">-->
                    <!--<ul>-->
                        <!--<li class="clear">-->
                            <!--<a target="_blank" href="{$soc.facebook}" class="_contactus_item fl"><i class="iconfont icon-tian7_facebook"></i></a>-->
                            <!--<div class="fl">-->
                                <!--<h3 class="_title">Facebook</h3>-->

                                <!--<a href="{$soc.facebook}" rel="nofollow">-->
                                   <!--{$soc.facebook}-->
                                <!--</a>-->
                            <!--</div>-->
                        <!--</li>-->
                        <!--<li class="clear">-->
                            <!--<a target="_blank" href="{$soc.youtube}" class="_contactus_item fl"><i class="iconfont icon-youtobe"></i></a>-->
                            <!--<div class="fl">-->
                                <!--<h3 class="_title">Youtube</h3>-->
                                <!--<a href="{$soc.youtube}" rel="nofollow">-->
                                    <!--{$soc.youtube}-->
                                <!--</a>-->
                            <!--</div>-->
                        <!--</li>-->
                        <!--<li class="clear">-->
                            <!--<a target="_blank" href="{$soc.twitter}" class="_contactus_item fl"><i class="iconfont icon-tw"></i></a>-->
                            <!--<div class="fl">-->
                                <!--<h3 class="_title">Twitter</h3>-->
                                <!--<a href="{$soc.twitter}" rel="nofollow">-->
                                    <!--{$soc.twitter}-->
                                <!--</a>-->
                            <!--</div>-->
                        <!--</li>-->
                    <!--</ul>-->
                <!--</div>-->
            </div>
        </div>
    </div>
    {include file="public/footer" /}
    <script type="text/javascript">
        var flag = 0;
        $('#subMit').click(function(){
            ga('send','event','contactmessage','click to submit','contactmessages')
            if(flag==3){
                alert('Dangerous Operation!');
                return false;
            }
            var tel = $('#tel').val();

            if(!$('#name').val()){
                alert('请填写姓名!')
                return false;
            }else if(!tel){
                alert('请填写手机!')
                return false;
            }
            var email = $('#email').val();
            if(email){
                if(!email.match(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/))
                {
                    alert("请填写正确的邮箱");
                    return false;
                }
            }
            alert('发送成功！');
            $.ajax({
                type: "POST",
                dataType: "json",
                url: '/home/danye/addcontactus',
                data: {
                    'name':$('#name').val(),
                    'com':$('#com').val(),
                    'email':$('#email').val(),
                    'tel':$('#tel').val(),
                    'country':'',
                    'content':$('#content').val(),
                    'type':1
                },
                success: function (res) {
                    var success = JSON.parse(res);
                    if(success.code===200){
                        flag = flag+1;
                        $('#name').val('')
                            $('#com').val('')
                          $('#email').val('')
                            $('#tel').val('')
                            $('#content').val('')

                        // alert(success.msg);
                    }else {
                        alert(success.msg);
                    }

                }
            });

        })
    </script>
    <script>
        ////输入框获得焦点时
        $("._inp_text").focus(function(event) {
            //label动态上升，升至顶部
            $(this).siblings("label").stop().addClass('acc').animate({"left": "520px"}, 500);
        });
        
        ////输入框失去焦点时
        $("._inp_text").blur(function(event) {
             //label动态下降，恢复原位
            $(this).siblings("label").stop().removeClass('acc').animate({"left": "25px"}, 500);
        });
    </script>
    <style>
        ._theway_top ul li span.newx{font-size: 26px;}
        .newinput{position:relative;}
        .newinput label{position: absolute;bottom: 44px;left: 25px;color: #666;opacity: 0;}
        .newinput label.acc{font-size: 12px;bottom: 33px;opacity: 1;}
        .newinput label.add{font-size: 12px;bottom: 6px;opacity: 1;}
        ._form ._inp_text{color: #333;}
    </style>
